package cn.cs.mapper;

import cn.cs.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface RepOrderMapper {
    int insertRepOrder(RepOrder order);

    RepOrder getRepOrderByAppOrderId(String id);

    List<RepOrder> getAllRepOrders(Map<String, Object> parm);

    RepOrder getRepOrderById(String id);

    List<RepProduct> getRepProsByOrderId(Map<String, Object> param);

    List<Map<String,Object>> getAllrepEva(String id);

    void insertQrHistory(QrHistory qrHistory);

    void insertRepProduct(RepProduct repProduct);

    Map<String,Object> getRepairPercentage();

    int updateRepOrder(RepOrder repOrder);

    void insertOrderBillImg(Map<String, Object> map);

    int insertTestReport(RepairTestReport testReport);

    List<Map<String,Object>> getRepProTypes();

    List<Map<String,Object>> getRepProTypesById(String typeId);

    List<Map<String,Object>> getQrHistoryByQrCode(String qrCode);

    RepairTestReport getTestReportByOrderId(String orderId);

    List<Map<String,Object>> getTestReportImgsById(String id);

    void insertRepImg(Map<String, Object> map);

    List<Map<String,Object>> getBillOrderImg(String orderId);

    List<Map<String,Object>> getHbRepOrderList(Map<String, Object> param);

    Map<String,Object> getRepOrderEvlById(String orderId);

    public Integer updateRepairPercentage(Map<String,Object> map);

    public List<Map<String, Object>> getOrderDetailsByOrderId(@Param(value = "orderId") String orderId, @Param(value = "type") String type);

    public List<Map<String, Object>>getOrderInvoiceByUserId(@Param(value = "userId") String userId, @Param(value = "phone") String phone)throws Exception;

    public int updateOrderByIds(String[] params)throws Exception;

    public List<Map<String, Object>>getOrderInvoiceByUserPId(@Param(value = "userId") String userId)throws Exception;


    int updateRepOrderBillState(RepOrder repOrder);

    List<Map<String,Object>> getServiceType();

    List<Map<String,Object>> getFaultType(String id);

    public List<Map<String,Object>> getMyEarningsByDay(Map<String, Object> map);

    public List<Map<String,Object>> getCountMyEarnings(Map<String, Object> map);

    public String getSetMoney(Map<String, Object> param);
}
